﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ScriptEditor.Commands
{
    class Command_HideChar : Command
    {
        public string name
        {
            get
            {
                return Value1;
            }
            set
            {
                Value1 = value;
            }
        }
        public float duration
        {
            get
            {
                return float.TryParse(Value2, out float result) ? result : 0.5f;
            }
            set
            {
                Value2 = value.ToString();
            }
        }
        public string transitionRef
        {
            get
            {
                return Value3;
            }
            set
            {
                Value3 = value;
            }
        }
        public Command_HideChar()
        {
            CommandType = COMMANDTYPE.HideChar;
            name = "请输入角色名";
            duration = 0.5f;
            transitionRef = "四周向中间";
        }
        public Command_HideChar(string Name, float Duration, string TransitionRef)
        {
            CommandType = COMMANDTYPE.HideChar;
            name = Name;
            duration = Duration;
            transitionRef = TransitionRef;
        }
        public override string ToString()
        {
            return CommandType.ToString() + ":\n" + "隐藏人物:" + name;
        }
    }
}
